package org.example.service.impl;

import org.example.dto.GradeDto;
import org.example.service.GradeService;
import org.example.vo.GradeVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Service
public class GradeServiceImpl implements GradeService {

//    @Resource
//    private GradeDao dao;


    @Override
    public Integer addGrade(GradeVo grade) {
        return 1;
    }

    @Override
    public Integer updateGrade(GradeVo grade) {
        return 1;
    }

    @Override
    public Integer deleteGrade(Integer gradeId) {
        return 1;
    }

    @Override
    public List<GradeDto> queryAllGrade() {
        List<GradeDto> gradeDtoList=new ArrayList<>();
        GradeDto gradeDto=new GradeDto();
        gradeDto.setGradeId(0);
        gradeDto.setGradeName("19软件");
        gradeDto.setDepartment("软件工程");
        gradeDto.setMajor("软件工程");
        gradeDtoList.add(0,gradeDto);
        return gradeDtoList;
    }

    @Override
    public Integer countGrade() {
        return 1;
    }

    @Override
    public List<GradeDto> queryGradeByDepartmentAndMajor(String department, String major) {
        List<GradeDto> gradeDtoList=new ArrayList<>();
        GradeDto gradeDto=new GradeDto();
        gradeDto.setGradeId(0);
        gradeDto.setGradeName("19软件");
        gradeDto.setDepartment("软件工程");
        gradeDto.setMajor("软件工程");
        gradeDtoList.add(0,gradeDto);
        return gradeDtoList;
    }

    @Override
    public GradeDto queryGradeById(Integer gradeId) {
        GradeDto gradeDto=new GradeDto();
        gradeDto.setGradeId(0);
        gradeDto.setGradeName("19软件");
        gradeDto.setDepartment("软件工程");
        gradeDto.setMajor("软件工程");
        return gradeDto;
    }

    @Override
    public Integer countGradeByDepartmentAndMajor(String department, String major) {
        return 1;
    }
}
